import tkinter as tk
from tkinter import *
import random

win = tk.Tk()
win.title("Guess the number")
win.geometry("650x650")

guess = IntVar()
guess.set(0)
hint = StringVar()
hint.set('Guess a number between 1 to 50')
score = IntVar()
score.set(5)
final_score = IntVar()
final_score.set(score.get())
## 设置随机数
num = random.randint(1,50)

def fun():
    x = guess.get()
    final_score.set(score.get())
    
    

## 设置基础标签
Label(win,text='I challenge you to guess the number',font=('Courier',20)).place(relx=0.5,rely=0.09,anchor=CENTER)
Label(win,text='Score out of 5',font=('Courier',20)).place(relx=0.3,rely=0.85,anchor=CENTER)
Button(win,text='CHECK',font=('Courier',20),relief=GROOVE
       ,bg='light blue',command=fun).place(relx=0.5,rely=0.5,anchor=CENTER)

## 设置输入框(可变量)



win.mainloop()